<?php
    
    $auth = $this->auth; 
    $acl                = new My_Acl();
    $listAllow          = $acl->listAllowed($auth);
    $listMenu           = array();
    foreach($listAllow as $row){
        if($row['moduleName'] == 'default' && $row['actionName'] == 'index' && !in_array($row['controllerName'], $listMenu)){
            $listMenu[]     = $row['controllerName'];
        }
    }
    
?>
<ul class="menu">
    <li><span class="yellow">Xin chào <strong class="yellow"><?php echo $auth['username'];?></strong></span></li>
    <li><a href="/index">Trang chủ Tool</a></li>
    <li><a href="default/chanpass/index">Đổi mật khẩu</a></li>
    <?php
        foreach($listMenu as $menu){
            if($menu == "role"){
                echo '<li><a href="/default/role/index">Phân Quyền</a></li>';
            }
            if($menu == "user"){
                echo '<li><a href="/default/user/index">Tài Khoản</a></li>';
            }
            if($menu == "partner"){
                echo '<li><a href="/default/partner/index">Partner</a></li>';
            }
        }
    ?>
    <li><a href="/auth/logout" class="logout">Đăng xuất</a></li>
</ul>